﻿using System;
using System.Collections.Generic;
using System.Data;

using System.Text;
using MySql.Data.MySqlClient;

namespace DotNETX.Authentication.Db.MySql
{
    public static class ConnectionUtils
    {

        public static IDbConnection CreateMySqlConnection(string datasource, string database, string uid, string pwd)
        {
            return new MySqlConnection(string.Format("Data Source={0};Database={1};User ID={2};Password={3}", datasource, database, uid, pwd));
        }

        public static IDbConnection CreateMySqlConnection(string connectionString)
        {
            return new MySqlConnection(connectionString);
        }
    }
}
